import request from "@/utils/request";

// 获取所有预测类型信息-下拉框集合
export function forecastTypesApi() {
  return request({
    url: `/types/fcst`,
    method: "get",
  });
}
// 获取模块选项-返回默认值
export function selectionsGetApi(method, type) {
  return request({
    url: `/selections?method=${method}&type=${type}`,
    method: "get",
  });
}
// 获取机场预测结果
export function airportsResultApi(data) {
  return request({
    url: "/forecast/airport/raim",
    method: "post",
    data,
  });
}
// 获取机场终端预测结果
export function airportsResultTerminalApi(data) {
  return request({
    url: "/forecast/airport-terminal/raim",
    method: "post",
    data,
  });
}
// 区域静态预测结果
export function airportsAreasRaimStaticApi(data) {
  return request({
    url: "/forecast/area/raim/static",
    method: "post",
    data,
  });
}
// 区域统计预测结果
export function forecastAreaRaimStatisticsApi(data) {
  return request({
    url: "/forecast/area/raim/statistics",
    method: "post",
    data,
  });
}
// adsb区域统计预测结果
export function forecastAreaAdsbStatisticsApi(data) {
  return request({
    url: "/forecast/area/adsb/statistics",
    method: "post",
    data,
  });
}
// 获取航路态势预测结果
export function forecastRouteRaimSituationApi(data) {
  return request({
    url: "/forecast/route/raim/situation",
    method: "post",
    data,
  });
}

// 获取情报区信息
export function firApi() {
  return request({
    url: "/fir",
    method: "get",
  });
}
// 查看用户航路分时信息
export function userAirlinesSplitApi(params) {
  return request({
    url: "/me/airlines/split",
    method: "get",
    params,
  });
}
// 获取所有航路点
export function typesWaypointApi() {
  return request({
    url: "/types/waypoint",
    method: "get",
  });
}
// 更新(保存)用户航线分时信息
export function putUserAirlinesSplitApi(data) {
  return request({
    url: "/me/airlines/split",
    method: "put",
    data,
  });
}
// 插入用户航线分时选项信息
export function postUserAirlinesSplitApi(data) {
  return request({
    url: "/me/airlines/split",
    method: "post",
    data,
  });
}
// 删除用户航线分时信息
export function deleteUserAirlinesSplitApi(params) {
  return request({
    url: "/me/airlines/split",
    method: "delete",
    params,
  });
}
// 根据ID查询用户航线分时信息
export function userAirlinesSplitIdApi(id) {
  return request({
    url: `/me/airlines/split/` + id,
    method: "get",
  });
}
// 查找用户自己定义的所有机场信息
export function meAirportsApi() {
  return request({
    url: "/me/airports",
    method: "get",
  });
}
// 更新(保存)自定义机场分时信息
export function putMeAirpsortsSplitApi(data) {
  return request({
    url: "/me/airports",
    method: "put",
    data,
  });
}
// 插入自定义机场分时选项信息
export function postMeAirpsortsSplitApi(data) {
  return request({
    url: "/me/airports",
    method: "post",
    data,
  });
}

// 删除自定义机场分时信息
export function deleteMeAirpsortsSplitApi(id) {
  return request({
    url: `/me/airports/` + id,
    method: "delete",
  });
}
// 获取用户自己定义的单个机场信息
export function userMeAirpsortsIdApi(id) {
  return request({
    url: `/me/airports/` + id,
    method: "get",
  });
}
// 查找用户自己定义的所有航路信息
export function meRoutesApi() {
  return request({
    url: "/me/routes",
    method: "get",
  });
}
// 添加用户自己定义的航路信息
export function postMeRoutesApi(data) {
  return request({
    url: "/me/routes",
    method: "post",
    data,
  });
}
// 删除用户自己定义的航路信息
export function deleteMeRoutesApi(id) {
  return request({
    url: `/me/routes/` + id,
    method: "delete",
  });
}
// 获取用户自己定义的单个航路信息
export function meRoutesIdApi(id) {
  return request({
    url: `/me/routes/` + id,
    method: "get",
  });
}
// 更新用户自己定义的航路信息
export function putMeRoutesApi(data) {
  return request({
    url: "/me/routes",
    method: "put",
    data,
  });
}
// 查找用户自己定义的所有航线信息
export function meAirlinesApi() {
  return request({
    url: "/me/airlines",
    method: "get",
  });
}
// 添加用户自己定义的航线信息
export function postMeAirlinesApi(data) {
  return request({
    url: "/me/airlines",
    method: "post",
    data,
  });
}
// 删除用户自己定义的航线信息
export function deleteMeAirlinesApi(id) {
  return request({
    url: `/me/airlines/` + id,
    method: "delete",
  });
}
// 根据ID查找用户自己定义的航线信息
export function meAirlinesIdApi(id) {
  return request({
    url: `/me/airlines/` + id,
    method: "get",
  });
}
// 更新用户自己定义的航线信息
export function putMeAirlinesApi(data) {
  return request({
    url: "/me/airlines",
    method: "put",
    data,
  });
}

// 查找用户自己定义的所有区域信息
export function meAreasApi() {
  return request({
    url: "/me/areas",
    method: "get",
  });
}
// 添加用户自己定义的区域信息
export function postMeAreasApi(data) {
  return request({
    url: "/me/areas",
    method: "post",
    data,
  });
}
// 删除用户自己定义的区域信息
export function deleteMeAreasApi(id) {
  return request({
    url: `/me/areas/` + id,
    method: "delete",
  });
}
// 根据ID查询用户自定义的区域信息
export function meAirAreasIdApi(id) {
  return request({
    url: `/me/areas/` + id,
    method: "get",
  });
}
// 更新用户自己定义的区域信息
export function putMeAreasApi(data) {
  return request({
    url: "/me/areas",
    method: "put",
    data,
  });
}
// 新增我的订阅
export function subscriptionsMeApi(data) {
  return request({
    url: "/subscriptions/me",
    method: "post",
    data,
  });
}
// 发送航路分时请求
export function postForecastRouteSplitApi(data) {
  return request({
    url: "/forecast/route/split",
    method: "post",
    data,
  });
}
// 发送航线分时请求
export function postForecastAirLineSplitApi(data) {
  return request({
    url: "/forecast/airline/split",
    method: "post",
    data,
  });
}
// 发送自定义机场预测请求
export function postForecastAirportCustomApi(data) {
  return request({
    url: "/forecast/airport/custom",
    method: "post",
    data,
  });
}
// 发送自定义航路预测请求
export function postForecastRouteCustomApi(data) {
  return request({
    url: "/forecast/route/custom",
    method: "post",
    data,
  });
}
// 发送自定义航线预测请求
export function postForecastAirlineCustomApi(data) {
  return request({
    url: "/forecast/airline/custom",
    method: "post",
    data,
  });
}
// 发送自定义区域预测请求
export function postForecastAreaCustomApi(data) {
  return request({
    url: "/forecast/area/custom",
    method: "post",
    data,
  });
}
